﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated) {
%>
        Welcome <b><%= Html.ActionLink(Html.Encode(Page.User.Identity.Name), "ViewAccount", "Account")%></b>!
         <%= Html.ActionLink("logoff", "LogOff", "Account") %> 
<%
    }
    else {
%> 
        <%= Html.ActionLink("login", "LogOn", "Account") %> &nbsp; <%= Html.ActionLink("register", "Register", "Account") %> 
        <!-- put this back in when we've sorted out the registration Ajax.
         <%= Html.ActionLink("login", "LogOn", "Account") %> &nbsp; <a id="registrationLink" href="#" title="Register">Register</a> 
        <div id="registration">
        <% Html.RenderPartial("RegisterFormPartial"); %>
        </div>        
<script type="text/javascript">
    $(document).ready(
        function() {
            $('#registrationLink').click(
            function() {
                $('#registration').toggle();
            });
        });        
</script>-->
<%
    }
%>
<%= Html.ActionLink("submit your snippets!", "Index", "Snippet")%>